package cn.tedu.es.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

@Document(indexName = "students")
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Student {

    // 对应es中的属性id
    @Id
    private Long id;

    // 对应es中的属性名name
    @Field(name = "name")
    private String name;
    private Character gender;
    private String birthDate;

}
